package com.ow.dva.module.order.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ow.dva.module.base.entity.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 订单表
 * </p>
 *
 * @author YanZengBao
 * @since 2020-02-19
 * @version V1.0
 */
@TableName("dva_order")
@ApiModel(value="Order对象", description="订单表")
public class Order extends BaseEntity {
    private static final long serialVersionUID = 1L;

    private String id;

    @ApiModelProperty(value = "订单编号")
    private String orderCode;

    @ApiModelProperty(value = "停车场ID")
    private String parkId;

    @ApiModelProperty(value = "停车场名称")
    private String parkName;

    @ApiModelProperty(value = "车牌号码")
    private String plateNo;

    @ApiModelProperty(value = "进场记录ID")
    private String enterRecordId;

    @ApiModelProperty(value = "离场记录ID")
    private String leaveRecordId;

    @ApiModelProperty(value = "停车时长")
    private Integer stopTime;

    @ApiModelProperty(value = "订单总价")
    private Double totalMoney;

    @ApiModelProperty(value = "实际金额")
    private Double reallyMoney;

    @ApiModelProperty(value = "优惠简介")
    private String discountIntro;

    @ApiModelProperty(value = "支付方式（0-未支付 1-支付宝 2-微信 3-余额 4-月租车）")
    private Integer payType;

    @ApiModelProperty(value = "订单状态（0-未支付 1-已支付 2-已失效）")
    private Integer orderStatus;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private Date createTime;
    @ApiModelProperty(value = "产生订单的终端编号")
    private String terminalCode;
    @ApiModelProperty(value = "产生订单的出场车道ID")
    private String roadId;

    @ApiModelProperty(value = "入场图片")
    private String enterImg;

    @ApiModelProperty(value = "出场图片")
    private String innerImg;

    @ApiModelProperty(value = "是否推送到手持设备0-否，1-是")
    private Integer jPushStatus;

    //记录各个消费方式的数量

    @TableField(exist = false)
    private Integer count;
    //消费方式
    @TableField(exist = false)
    private String payTypeS;
    @TableField(exist = false)
    private String sbCode;
    @TableField(exist = false)
    private Double sumMonthMoney;

    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date innerTime;

    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date enterTime;
    @TableField(exist = false)
    Integer counts;//订单总数
    @TableField(exist = false)
    Integer completeCount;//已完成数量
    @TableField(exist = false)
    double moneys;//收费总额
    @TableField(exist = false)
    double completeMoney;//已完成金额
    @TableField(exist = false)
    String date;
    @TableField(exist = false)
    private Double allReallyMoneys;
    @TableField(exist = false)//Echarts遍历用
    private Integer months;
    @TableField(exist = false)
    Integer singleCounts;//单日/月，已完成数量
    @TableField(exist = false)
    Integer allCompleteCount;//单日/月，订单总数



    public Order() {
    }

    public Order(String id, String orderCode, String parkId, String parkName, String plateNo, String enterRecordId, String leaveRecordId, Integer stopTime, Double totalMoney, Double reallyMoney, String discountIntro, Integer payType, Integer orderStatus, Date createTime) {
        this.id = id;
        this.orderCode = orderCode;
        this.parkId = parkId;
        this.parkName = parkName;
        this.plateNo = plateNo;
        this.enterRecordId = enterRecordId;
        this.leaveRecordId = leaveRecordId;
        this.stopTime = stopTime;
        this.totalMoney = totalMoney;
        this.reallyMoney = reallyMoney;
        this.discountIntro = discountIntro;
        this.payType = payType;
        this.orderStatus = orderStatus;
        this.createTime = createTime;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getOrderCode() {
        return orderCode;
    }

    public void setOrderCode(String orderCode) {
        this.orderCode = orderCode;
    }

    public String getParkId() {
        return parkId;
    }

    public void setParkId(String parkId) {
        this.parkId = parkId;
    }

    public String getParkName() {
        return parkName;
    }

    public void setParkName(String parkName) {
        this.parkName = parkName;
    }

    public String getPlateNo() {
        return plateNo;
    }

    public void setPlateNo(String plateNo) {
        this.plateNo = plateNo;
    }

    public String getEnterRecordId() {
        return enterRecordId;
    }

    public void setEnterRecordId(String enterRecordId) {
        this.enterRecordId = enterRecordId;
    }

    public String getLeaveRecordId() {
        return leaveRecordId;
    }

    public void setLeaveRecordId(String leaveRecordId) {
        this.leaveRecordId = leaveRecordId;
    }

    public Integer getStopTime() {
        return stopTime;
    }

    public void setStopTime(Integer stopTime) {
        this.stopTime = stopTime;
    }

    public Double getTotalMoney() {
        return totalMoney;
    }

    public void setTotalMoney(Double totalMoney) {
        this.totalMoney = totalMoney;
    }

    public Double getReallyMoney() {
        return reallyMoney;
    }

    public void setReallyMoney(Double reallyMoney) {
        this.reallyMoney = reallyMoney;
    }

    public String getDiscountIntro() {
        return discountIntro;
    }

    public void setDiscountIntro(String discountIntro) {
        this.discountIntro = discountIntro;
    }

    public Integer getPayType() {
        return payType;
    }

    public void setPayType(Integer payType) {
        this.payType = payType;
    }

    public Integer getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(Integer orderStatus) {
        this.orderStatus = orderStatus;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getTerminalCode() {
        return terminalCode;
    }

    public void setTerminalCode(String terminalCode) {
        this.terminalCode = terminalCode;
    }

    public String getRoadId() {
        return roadId;
    }

    public void setRoadId(String roadId) {
        this.roadId = roadId;
    }

    public String getEnterImg() {
        return enterImg;
    }

    public void setEnterImg(String enterImg) {
        this.enterImg = enterImg;
    }

    public String getInnerImg() {
        return innerImg;
    }

    public void setInnerImg(String innerImg) {
        this.innerImg = innerImg;
    }

    public Integer getjPushStatus() {
        return jPushStatus;
    }

    public void setjPushStatus(Integer jPushStatus) {
        this.jPushStatus = jPushStatus;
    }

    public String getPayTypeS() {
        return payTypeS;
    }

    public void setPayTypeS(String payTypeS) {
        this.payTypeS = payTypeS;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public String getSbCode() {
        return sbCode;
    }

    public void setSbCode(String sbCode) {
        this.sbCode = sbCode;
    }

    public Double getSumMonthMoney() {
        return sumMonthMoney;
    }

    public void setSumMonthMoney(Double sumMonthMoney) {
        this.sumMonthMoney = sumMonthMoney;
    }

    public Date getInnerTime() {
        return innerTime;
    }

    public void setInnerTime(Date innerTime) {
        this.innerTime = innerTime;
    }

    public Date getEnterTime() {
        return enterTime;
    }

    public void setEnterTime(Date enterTime) {
        this.enterTime = enterTime;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public Integer getCounts() {
        return counts;
    }

    public void setCounts(Integer counts) {
        this.counts = counts;
    }

    public double getMoneys() {
        return moneys;
    }

    public void setMoneys(double moneys) {
        this.moneys = moneys;
    }

    public Integer getCompleteCount() {
        return completeCount;
    }

    public void setCompleteCount(Integer completeCount) {
        this.completeCount = completeCount;
    }

    public double getCompleteMoney() {
        return completeMoney;
    }

    public void setCompleteMoney(double completeMoney) {
        this.completeMoney = completeMoney;
    }

    public Double getAllReallyMoneys() {
        return allReallyMoneys;
    }

    public void setAllReallyMoneys(Double allReallyMoneys) {
        this.allReallyMoneys = allReallyMoneys;
    }

    public Integer getMonths() {
        return months;
    }

    public void setMonths(Integer months) {
        this.months = months;
    }

    public Integer getSingleCounts() {
        return singleCounts;
    }

    public void setSingleCounts(Integer singleCounts) {
        this.singleCounts = singleCounts;
    }

    public Integer getAllCompleteCount() {
        return allCompleteCount;
    }

    public void setAllCompleteCount(Integer allCompleteCount) {
        this.allCompleteCount = allCompleteCount;
    }

    @Override
    public String toString() {
        return "Order{" +
                "id=" + id +
                ", orderCode=" + orderCode +
                ", parkId=" + parkId +
                ", parkName=" + parkName +
                ", plateNo=" + plateNo +
                ", enterRecordId=" + enterRecordId +
                ", leaveRecordId=" + leaveRecordId +
                ", stopTime=" + stopTime +
                ", totalMoney=" + totalMoney +
                ", reallyMoney=" + reallyMoney +
                ", discountIntro=" + discountIntro +
                ", payType=" + payType +
                ", orderStatus=" + orderStatus +
                ", createTime=" + createTime +
                "}";
    }
}
